/**
 * Copyright (c) 2016-2019 ykf All rights reserved.
 * <p>
 * https://www.renren.io
 * <p>
 * 版权所有，侵权必究！
 */

package com.basic.modules.sys.controller;

import cn.hutool.core.date.DateTime;
import cn.hutool.core.date.DateUtil;
import cn.hutool.core.util.ObjectUtil;
import cn.hutool.core.util.StrUtil;
import cn.hutool.json.JSONArray;
import cn.hutool.json.JSONUtil;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
import com.basic.common.annotation.StringTrim;
import com.basic.common.exception.RRException;
import com.basic.common.utils.Query;
import com.basic.common.utils.R;
import com.basic.modules.sys.entity.SysMenuEntity;
import com.basic.modules.sys.entity.SysUserEntity;
import com.basic.modules.sys.form.SysLoginForm;
import com.basic.modules.sys.model.MainPageReq;
import com.basic.modules.sys.model.MainPageShopDetailModel;
import com.basic.modules.sys.model.MainPageShopModel;
import com.basic.modules.sys.model.PasswordModel;
import com.basic.modules.sys.service.SysCaptchaService;
import com.basic.modules.sys.service.SysMenuService;
import com.basic.modules.sys.service.SysUserService;
import com.basic.modules.sys.service.SysUserTokenService;
import com.basic.modules.ykf.entity.YkfAccountInputRecordEntity;
import com.basic.modules.ykf.entity.YkfCustomerShopEntity;
import com.basic.modules.ykf.entity.YkfDictDetailEntity;
import com.basic.modules.ykf.entity.YkfDictEntity;
import com.basic.modules.ykf.service.YkfAccountInputRecordService;
import com.basic.modules.ykf.service.YkfCustomerShopService;
import com.basic.modules.ykf.service.YkfDictDetailService;
import com.basic.modules.ykf.service.YkfDictService;
import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;
import lombok.Data;
import org.apache.commons.io.IOUtils;
import org.apache.shiro.crypto.hash.Sha256Hash;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RestController;

import javax.imageio.ImageIO;
import javax.servlet.ServletOutputStream;
import javax.servlet.http.HttpServletResponse;
import java.awt.image.BufferedImage;
import java.io.IOException;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.util.*;

/**
 * 登录相关
 *
 * @author Mark sunlightcs@gmail.com
 */
@RestController
public class SysLoginController extends AbstractController {
    @Autowired
    private SysUserService sysUserService;
    @Autowired
    private SysUserTokenService sysUserTokenService;
    @Autowired
    private SysCaptchaService sysCaptchaService;

    @Autowired
    private SysMenuService sysMenuService;

    @Autowired
    private YkfDictDetailService dictDetailService;

    @Autowired
    private YkfDictService dictService;

    @Autowired
    private YkfAccountInputRecordService inputRecordService;

    @Autowired
    private YkfCustomerShopService shopService;

    /**
     * 验证码
     */
    @GetMapping("captcha.jpg")
    public void captcha(HttpServletResponse response, String uuid) throws IOException {
        response.setHeader("Cache-Control", "no-store, no-cache");
        response.setContentType("image/jpeg");

        //获取图片验证码
        BufferedImage image = sysCaptchaService.getCaptcha(uuid);

        ServletOutputStream out = response.getOutputStream();
        ImageIO.write(image, "jpg", out);
        IOUtils.closeQuietly(out);
    }

    /**
     * 登录
     */
    @StringTrim
    @PostMapping("/sys/login")
    public Map<String, Object> login(@RequestBody SysLoginForm form) throws IOException {
//		boolean captcha = sysCaptchaService.validate(form.getUuid(), form.getCaptcha());
//		if(!captcha){
//			return R.error("验证码不正确");
//		}

        //用户信息
        SysUserEntity user = sysUserService.queryByUserName(form.getUsername());

        //账号不存在、密码错误
        if (user == null || !user.getPassword().equals(new Sha256Hash(form.getPassword(), user.getSalt()).toHex())) {
            return R.error("账号或密码不正确");
        }

        //账号锁定
//        if (user.getStatus() == 0) {
//            return R.error("账号已被锁定,请联系管理员");
//        }

        //生成token，并保存到数据库
        R r = sysUserTokenService.createToken(user.getUserId());
        return r;
    }


    /**
     * 退出
     */
    @PostMapping("/sys/logout")
    public R logout() {
        sysUserTokenService.logout(getUserId());
        return R.ok();
    }


    /**
     * 退出
     */
    @PostMapping("/sys/updatePassword")
    public R updatePassword(@RequestBody PasswordModel passwordModel) {
        if (ObjectUtil.isEmpty(passwordModel) || StrUtil.isBlank(passwordModel.getOldPassword()) || StrUtil.isBlank(passwordModel.getNewPassword())) {
            throw new RRException("参数缺失");
        }
        SysUserEntity user = getUser();
        if (user == null || !user.getPassword().equals(new Sha256Hash(passwordModel.getOldPassword(), user.getSalt()).toHex())) {
            throw  new RRException("旧密码不正确");
        }
        UpdateWrapper<SysUserEntity> updateWrapper = new UpdateWrapper<>();
        updateWrapper.lambda().eq(SysUserEntity::getUserId, user.getUserId())
                        .set(SysUserEntity::getPassword, new Sha256Hash(passwordModel.getNewPassword(), user.getSalt()).toHex());
        sysUserService.update(updateWrapper);
        sysUserTokenService.logout(getUserId());
        return R.ok();
    }


    /**
     * 当日概况
     */
    @PostMapping("/mainPage/today")
    public R today(@RequestBody MainPageReq req) {
        List<Map<String, Object>> maps = new ArrayList<>();
        if (ObjectUtil.isNotEmpty(req) && StrUtil.isNotBlank(req.getDate())) {
            QueryWrapper<YkfAccountInputRecordEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.lambda().eq(YkfAccountInputRecordEntity::getDate, req.getDate());
            List<YkfAccountInputRecordEntity> list = inputRecordService.list(queryWrapper);
            BigDecimal sum1 = BigDecimal.ZERO;
            BigDecimal sum2 = BigDecimal.ZERO;
            BigDecimal sum3 = BigDecimal.ZERO;
            BigDecimal sum4 = BigDecimal.ZERO;
            BigDecimal sum5 = BigDecimal.ZERO;
            BigDecimal sum6 = BigDecimal.ZERO;
            BigDecimal length = BigDecimal.ZERO;
            if (ObjectUtil.isNotEmpty(list)) {
                length = BigDecimal.valueOf(list.size());
                for (YkfAccountInputRecordEntity item : list) {
                    sum1 = sum1.add(item.getSalesRevenue());
                    sum2 = sum2.add(item.getReceptionVolume());
                    sum3 = sum3.add(item.getConversionRate());
                    sum4 = sum4.add(item.getQARatio());
                    sum5 = sum5.add(item.getResponseRate());
                    sum6 = sum6.add(item.getResponseTime());
                }
            }
            Map<String, Object> map1 = new HashMap<>();
            map1.put("name", "日销售总额");
            map1.put("value", subZeroAndDot(sum1.toPlainString()) + "元");

            Map<String, Object> map2 = new HashMap<>();
            map2.put("name", "日平均接待量");
            Map<String, Object> map3 = new HashMap<>();
            map3.put("name", "日平均转化率");
            Map<String, Object> map4 = new HashMap<>();
            map4.put("name", "日平均答问比");
            Map<String, Object> map5 = new HashMap<>();
            map5.put("name", "日平均回复率");
            Map<String, Object> map6 = new HashMap<>();
            map6.put("name", "日平均响应时间");
            if (length.compareTo(BigDecimal.ZERO) > 0) {
                map2.put("value", subZeroAndDot((sum2.divide(length, 2, RoundingMode.HALF_UP)).toPlainString()) + "人");
                map3.put("value", subZeroAndDot((sum3.divide(length, 2, RoundingMode.HALF_UP)).toPlainString()) + "%");
                map4.put("value", subZeroAndDot((sum4.divide(length, 2, RoundingMode.HALF_UP)).toPlainString()) + "%");
                map5.put("value", subZeroAndDot((sum5.divide(length, 2, RoundingMode.HALF_UP)).toPlainString()) + "%");
                map6.put("value", subZeroAndDot((sum6.divide(length, 2, RoundingMode.HALF_UP)).toPlainString()) + "秒");
            } else {
                map2.put("value", "0人");
                map3.put("value", "0%");
                map4.put("value", "0%");
                map5.put("value", "0%");
                map6.put("value", "0秒");
            }
            maps.add(map1);
            maps.add(map2);
            maps.add(map3);
            maps.add(map4);
            maps.add(map5);
            maps.add(map6);
        }
        return R.ok(maps);
    }

    /**
     * 当日之星
     */
    @PostMapping("/mainPage/todayStar")
    public R todayStar(@RequestBody MainPageReq req) {
        List<Map<String, Object>> maps = new ArrayList<>();
        if (ObjectUtil.isNotEmpty(req) && StrUtil.isNotBlank(req.getDate())) {
            QueryWrapper<YkfAccountInputRecordEntity> queryWrapper = new QueryWrapper<>();
            queryWrapper.lambda().eq(YkfAccountInputRecordEntity::getDate, req.getDate());
            List<YkfAccountInputRecordEntity> list = inputRecordService.list(queryWrapper);
            if (ObjectUtil.isNotEmpty(list)) {
                YkfAccountInputRecordEntity record1 = list.stream().max(Comparator.comparingDouble(o -> o.getSalesRevenue().doubleValue())).get();
                YkfAccountInputRecordEntity record2 = list.stream().max(Comparator.comparingDouble(o -> o.getReceptionVolume().doubleValue())).get();
                YkfAccountInputRecordEntity record3 = list.stream().max(Comparator.comparingDouble(o -> o.getConversionRate().doubleValue())).get();
                YkfAccountInputRecordEntity record4 = list.stream().min(Comparator.comparingDouble(o -> o.getResponseTime().doubleValue())).get();
                YkfAccountInputRecordEntity record5 = list.stream().max(Comparator.comparingDouble(o -> o.getQARatio().doubleValue())).get();

                Map<String, Object> map1 = new HashMap<>();
                map1.put("title", "销售冠军");
                map1.put("name", record1.getAccountName());
                map1.put("value", subZeroAndDot(record1.getSalesRevenue().setScale(2).toPlainString()) + "元");
                maps.add(map1);
                Map<String, Object> map2 = new HashMap<>();
                map2.put("title", "接待冠军");
                map2.put("name", record2.getAccountName());
                map2.put("value", subZeroAndDot(record2.getReceptionVolume().setScale(2).toPlainString()) + "人");
                maps.add(map2);
                Map<String, Object> map3 = new HashMap<>();
                map3.put("title", "转化冠军");
                map3.put("name", record3.getAccountName());
                map3.put("value", subZeroAndDot(record3.getConversionRate().setScale(2).toPlainString()) + "%");
                maps.add(map3);
                Map<String, Object> map4 = new HashMap<>();
                map4.put("title", "响应冠军");
                map4.put("name", record4.getAccountName());
                map4.put("value", subZeroAndDot(record4.getResponseTime().setScale(2).toPlainString()) + "秒");
                maps.add(map4);
                Map<String, Object> map5 = new HashMap<>();
                map5.put("title", "答问比冠军");
                map5.put("name", record5.getAccountName());
                map5.put("value", subZeroAndDot(record5.getQARatio().setScale(2).toPlainString()) + "%");
                maps.add(map5);
            }
        }
        return R.ok(maps);
    }

    /**
     * 客服概况
     */
    @PostMapping("/mainPage/cusSer")
    public R cusSer(@RequestBody MainPageReq req) {
        Map<String, List<Map<String, BigDecimal>>> resultMap = new HashMap<>();
        List<Map<String, BigDecimal>> list1 = new ArrayList<>();
        List<Map<String, BigDecimal>> list2 = new ArrayList<>();
        List<Map<String, BigDecimal>> list3 = new ArrayList<>();
        List<Map<String, BigDecimal>> list4 = new ArrayList<>();
        List<Map<String, BigDecimal>> list5 = new ArrayList<>();
        List<Map<String, BigDecimal>> list6 = new ArrayList<>();
        if (ObjectUtil.isNotEmpty(req) && StrUtil.isNotBlank(req.getStartDate()) && StrUtil.isNotBlank(req.getEndDate())) {
            String currentDate = req.getStartDate();
            while (currentDate.compareTo(req.getEndDate()) <= 0) {
                QueryWrapper<YkfAccountInputRecordEntity> queryWrapper = new QueryWrapper<>();
                queryWrapper.lambda().eq(YkfAccountInputRecordEntity::getDate, currentDate);
                List<YkfAccountInputRecordEntity> list = inputRecordService.list(queryWrapper);
                BigDecimal sum1 = BigDecimal.ZERO;
                BigDecimal sum2 = BigDecimal.ZERO;
                BigDecimal sum3 = BigDecimal.ZERO;
                BigDecimal sum4 = BigDecimal.ZERO;
                BigDecimal sum5 = BigDecimal.ZERO;
                BigDecimal sum6 = BigDecimal.ZERO;
                BigDecimal length = BigDecimal.ZERO;
                if (ObjectUtil.isNotEmpty(list)) {
                    length = BigDecimal.valueOf(list.size());
                    for (YkfAccountInputRecordEntity item : list) {
                        sum1 = sum1.add(item.getSalesRevenue());
                        sum2 = sum2.add(item.getReceptionVolume());
                        sum3 = sum3.add(item.getConversionRate());
                        sum4 = sum4.add(item.getQARatio());
                        sum5 = sum5.add(item.getResponseRate());
                        sum6 = sum6.add(item.getResponseTime());
                    }
                }
                Map<String, BigDecimal> map1 = new HashMap<>();
                map1.put(currentDate, sum1);
                Map<String, BigDecimal> map2 = new HashMap<>();
                Map<String, BigDecimal> map3 = new HashMap<>();
                Map<String, BigDecimal> map4 = new HashMap<>();
                Map<String, BigDecimal> map5 = new HashMap<>();
                Map<String, BigDecimal> map6 = new HashMap<>();
                if (length.compareTo(BigDecimal.ZERO) > 0) {
                    map2.put(currentDate, sum2.divide(length, 2, RoundingMode.HALF_UP));
                    map3.put(currentDate, sum3.divide(length, 2, RoundingMode.HALF_UP));
                    map4.put(currentDate, sum4.divide(length, 2, RoundingMode.HALF_UP));
                    map5.put(currentDate, sum5.divide(length, 2, RoundingMode.HALF_UP));
                    map6.put(currentDate, sum6.divide(length, 2, RoundingMode.HALF_UP));
                } else {
                    map2.put(currentDate, BigDecimal.ZERO);
                    map3.put(currentDate, BigDecimal.ZERO);
                    map4.put(currentDate, BigDecimal.ZERO);
                    map5.put(currentDate, BigDecimal.ZERO);
                    map6.put(currentDate, BigDecimal.ZERO);
                }
                list1.add(map1);
                list2.add(map2);
                list3.add(map3);
                list4.add(map4);
                list5.add(map5);
                list6.add(map6);
                DateTime parse = DateUtil.parse(currentDate, "yyyy-MM-dd");
                currentDate = DateUtil.formatDate(DateUtil.offsetDay(parse, 1));
            }
        }
        resultMap.put("salesRevenue", list1);
        resultMap.put("receptionVolume", list2);
        resultMap.put("conversionRate", list3);
        resultMap.put("qARatio", list4);
        resultMap.put("responseRate", list5);
        resultMap.put("responseTime", list6);
        return R.ok(resultMap);
    }

    /**
     * 续费预警
     */
    @PostMapping("/mainPage/renewAlert")
    public R renewAlert() {
        LinkedHashMap<String, Object> map = new LinkedHashMap<>();
        String date = DateUtil.today();
        String date3 = DateUtil.formatDate(DateUtil.offsetDay(DateUtil.date(), 3));
        String date7 = DateUtil.formatDate(DateUtil.offsetDay(DateUtil.date(), 7));
        QueryWrapper<YkfCustomerShopEntity> queryWrapper1 = new QueryWrapper<>();
        queryWrapper1.lambda().lt(YkfCustomerShopEntity::getEndDate, date);
        map.put("已到期", shopService.count(queryWrapper1));
        QueryWrapper<YkfCustomerShopEntity> queryWrapper2 = new QueryWrapper<>();
        queryWrapper2.lambda().eq(YkfCustomerShopEntity::getEndDate, date);
        map.put("今日到期", shopService.count(queryWrapper2));
        QueryWrapper<YkfCustomerShopEntity> queryWrapper3 = new QueryWrapper<>();
        queryWrapper3.lambda().le(YkfCustomerShopEntity::getEndDate, date3)
                .gt(YkfCustomerShopEntity::getEndDate, date);
        map.put("最近三天到期", shopService.count(queryWrapper3));
        QueryWrapper<YkfCustomerShopEntity> queryWrapper4 = new QueryWrapper<>();
        queryWrapper4.lambda().le(YkfCustomerShopEntity::getEndDate, date7)
                .gt(YkfCustomerShopEntity::getEndDate, date);
        map.put("最近一周到期", shopService.count(queryWrapper4));
        return R.ok(map);
    }

    /**
     * 分配预警
     */
    @PostMapping("/mainPage/assignAlert")
    public R assignAlert() {
        List<MainPageShopModel> list = shopService.assignAlert();
        return R.ok(list);
    }

    /**
     * 分配预警详情
     */
    @PostMapping("/mainPage/assignAlertDetail")
    public R assignAlertDetail(@RequestBody MainPageShopModel mainPageShopModel) {
        if (ObjectUtil.isEmpty(mainPageShopModel) || ObjectUtil.isEmpty(mainPageShopModel.getShopId())) {
            throw new RRException("参数缺失");
        }
        List<MainPageShopDetailModel> list = shopService.assignAlertDetail(mainPageShopModel.getShopId());
        return R.ok(list);
    }

    public static String subZeroAndDot(String s) {
        if (s.indexOf(".") > 0) {
            //去掉多余的0
            s = s.replaceAll("0+?$", "");
            //如最后一位是.则去掉
            s = s.replaceAll("[.]$", "");
        }
        return s;
    }

//	/**
//	 * main
//	 */
//	@PostMapping("/main")
//	public R main() {
//		String str = "0\t客户管理\t\n" +
//				"客户管理\t客户咨询记录\t新增,导出,编辑\n" +
//				"客户管理\t平台客户管理\t添加,导出,批量修改对接人,编辑,停止合作,到期通知,复制,改动记录\n" +
//				"客户管理\t店铺流失登记\t导出,历史记录,恢复合作,删除\n" +
//				"客户管理\t客户分类数据\t\n" +
//				"客户管理\t客户效益查询\t导出,服务数据\n" +
//				"0\t客服管理\t\n" +
//				"客服管理\t客服列表\t导出,添加到白名单,添加到黑名单,编辑,清空编组\n" +
//				"客服管理\t客服考试分数\t添加,导入,导出\n" +
//				"0\t店铺管理\t\n" +
//				"店铺管理\t子账号管理\t添加,导出,分配客服,编辑,停用\n" +
//				"店铺管理\t已停用子账号\t导出,恢复,删除\n" +
//				"店铺管理\t子账号在线状态 \t导出,添加状态\n" +
//				"店铺管理\t店铺分配规则\t客服检测,设置默认,修改,删除\n" +
//				"店铺管理\t加班登记\t添加,导出,修改,删除\n" +
//				"店铺管理\t店铺停止合作登记 \t添加,修改,删除\n" +
//				"0\t数据管理\t\n" +
//				"数据管理\t数据查询录入\t录入数据,当天不检测,永远不检测,导入,导出,不检测列表\n" +
//				"数据管理\t数据分析\t店铺每日绩效,店铺整体缋效,接待量预警,客服接待汇总表,客服考核汇总表,销售额统计表,录入量统计表,导出\n" +
//				"0\t质检管理\t\n" +
//				"质检管理\t客服接待一览表\t\n" +
//				"质检管理\t质检处罚\t添加,导出,修改,删除\n" +
//				"0\t提成管理\t\n" +
//				"提成管理\t提成系数\t添加,修改,删除\n" +
//				"提成管理\t客服提成核对表\t导出\n" +
//				"提成管理\t客服月提成总表\t导出\n" +
//				"提成管理\t服务费统计表\t\n" +
//				"0\t知识管理\t\n" +
//				"知识管理\t培训视频\t添加,修改,删除\n" +
//				"知识管理\t话术管理\t添加,修改,删除,复制内容\n" +
//				"知识管理\t文库管理\t添加,修改,删除\n" +
//				"知识管理\t素材管理\t打开,添加,修改,删除\n" +
//				"0\t员工管理\t\n" +
//				"员工管理\t员工信息\t添加,导出编辑,删除发送离职短信\n" +
//				"0\t系统管理\t\n" +
//				"系统管理\t数据字典\t添加,编辑,删除\n" +
//				"系统管理\t角色管理\t添加,添加成员,编辑,删除\n" +
//				"系统管理\t短信日志\t添加,编辑,删除";
//		List<String> split = StrUtil.split(str, '\n');
//		Long parentId = 0L;
//		Long buttonParentId = 0L;
//		int orderNum = 1;
//		for (int i = 0; i < split.size(); i++) {
//			String s = split.get(i);
//			List<String> split1 = StrUtil.split(s, '\t');
//			if (StrUtil.equals(split1.get(0), "0")) {
//				SysMenuEntity menu = new SysMenuEntity();
//				menu.setParentId(0L);
//				menu.setName(split1.get(1));
//				menu.setType(0);
//				menu.setOrderNum(orderNum);
//				sysMenuService.save(menu);
//				parentId = menu.getMenuId();
//				orderNum++;
//			} else {
//				String s1 = split1.get(1);
//				SysMenuEntity menu = new SysMenuEntity();
//				menu.setParentId(parentId);
//				menu.setName(s1);
//				menu.setType(1);
//				sysMenuService.save(menu);
//				buttonParentId = menu.getMenuId();
//				String buttonStr = split1.get(2);
//				List<String> buttonList = StrUtil.split(buttonStr, ',');
//				for (int i1 = 0; i1 < buttonList.size(); i1++) {
//					String s2 = buttonList.get(i1);
//					SysMenuEntity menu1 = new SysMenuEntity();
//					menu1.setParentId(buttonParentId);
//					menu1.setName(s2);
//					menu1.setType(2);
//					menu1.setOrderNum(i1 + 1);
//					sysMenuService.save(menu1);
//				}
//			}
//		}
//		return R.ok();
//	}

    /**
     * main
     */
    @PostMapping("/saveDict")
    public R saveDict() {
        String str = "[\n" +
                "    {\n" +
                "        \"id\": \"customGroup\",\n" +
                "        \"name\": \"客服分组\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"YLYH_01\",\n" +
                "                \"name\": \"总部_客服二部_王新刚\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_02\",\n" +
                "                \"name\": \"总部_客服一部_陈辰\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_03\",\n" +
                "                \"name\": \"分公司_城东一组_陈辰\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_04\",\n" +
                "                \"name\": \"分公司_城东二组_王新刚\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_05\",\n" +
                "                \"name\": \"分公司_城南一组_杨书海\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_06\",\n" +
                "                \"name\": \"分公司_城南二组_刘强\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_07\",\n" +
                "                \"name\": \"总部_客服一部_杨书海\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_08\",\n" +
                "                \"name\": \"总部_客服二部_刘强\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_09\",\n" +
                "                \"name\": \"分公司 _蚌埠分部 _张春辉\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_10\",\n" +
                "                \"name\": \"分公司_城西二组_王新刚\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_11\",\n" +
                "                \"name\": \"分公司_城西一组_陈辰\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_12\",\n" +
                "                \"name\": \"总部_客服一部_停用\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"name\": \"总部_客服二部_停用\",\n" +
                "                \"val\": \"YLYH_13\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_14\",\n" +
                "                \"name\": \"分公司_迈巢一组_杨书海\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_15\",\n" +
                "                \"name\": \"分公司_迈巢二组_刘强\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_16\",\n" +
                "                \"name\": \"加盟商_辰启二组_刘强\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_17\",\n" +
                "                \"name\": \"加盟商_星火一组_陈辰\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_18\",\n" +
                "                \"name\": \"加盟商_星火二组_王新刚\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_19\",\n" +
                "                \"name\": \"加盟商_辰启一组_杨书海\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_20\",\n" +
                "                \"name\": \"加盟商_安鞍一组_杨书海\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YLYH_21\",\n" +
                "                \"name\": \"加盟商_安鞍二组_刘强\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"TYTX_ 01\",\n" +
                "                \"name\": \"途游项目\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"customType\",\n" +
                "        \"name\": \"客服类别\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"preGroup\",\n" +
                "                \"name\": \"共享客服(售前)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"afterGroup\",\n" +
                "                \"name\": \"共享客服(售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"共享客服(售前售后)\",\n" +
                "                \"name\": \"共享客服(售前售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"高级共享客服(售前)\",\n" +
                "                \"name\": \"高级共享客服(售前)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"高级共享客服(售后)\",\n" +
                "                \"name\": \"高级共享客服(售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"高级共享客服(售前售后)\",\n" +
                "                \"name\": \"高级共享客服(售前售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"preGroup-custom\",\n" +
                "                \"name\": \"定制共享客服 (售前)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"afterGroup-custom\",\n" +
                "                \"name\": \"定制客共享服 (售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"定制共享客服(售前售后)\",\n" +
                "                \"name\": \"定制共享客服(售前售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"putongGroup\",\n" +
                "                \"name\": \"专席客服(售前)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"专席客服(售后)\",\n" +
                "                \"name\": \"专席客服(售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"专席客服(售前售后)\",\n" +
                "                \"name\": \"专席客服(售前售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"vipGroup\",\n" +
                "                \"name\": \"专席客服(VIP大客户)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"putongGroup-custom\",\n" +
                "                \"name\": \"定制专席客服(售前)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"定制专席客服(售后)\",\n" +
                "                \"name\": \"定制专席客服(售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"定制专席客服(售前售后)\",\n" +
                "                \"name\": \"定制专席客服(售前售后)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"工单客服\",\n" +
                "                \"name\": \"工单客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"挂号客服\",\n" +
                "                \"name\": \"挂号客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"artdesigning\",\n" +
                "                \"name\": \"美工设计\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游业务\",\n" +
                "                \"name\": \"途游业务\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"platform\",\n" +
                "        \"name\": \"对象平台\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"TB\",\n" +
                "                \"name\": \"淘宝\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"TM\",\n" +
                "                \"name\": \"天猫\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"JD\",\n" +
                "                \"name\": \"京东\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"DY\",\n" +
                "                \"name\": \"抖音\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"PDD\",\n" +
                "                \"name\": \"拼多多\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"KSXD\",\n" +
                "                \"name\": \"快手小店\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"WX\",\n" +
                "                \"name\": \"微信\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1688\",\n" +
                "                \"name\": \"1688\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"XHS\",\n" +
                "                \"name\": \"小红书\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"DW\",\n" +
                "                \"name\": \"得物\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"MLS\",\n" +
                "                \"name\": \"美丽说\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"MGJ\",\n" +
                "                \"name\": \"蘑菇街\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"WPH\",\n" +
                "                \"name\": \"唯品会\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"TGC\",\n" +
                "                \"name\": \"淘工厂\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"WYKL\",\n" +
                "                \"name\": \"网易考拉\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"YZ\",\n" +
                "                \"name\": \"有赞\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"WYYX\",\n" +
                "                \"name\": \"网易严选\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"BY\",\n" +
                "                \"name\": \"必要\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"WYQY\",\n" +
                "                \"name\": \"网易七鱼\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"OTHER\",\n" +
                "                \"name\": \"其它\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"TY\",\n" +
                "                \"name\": \"途游\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"shopType\",\n" +
                "        \"name\": \"店铺经营类别\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"女装\",\n" +
                "                \"name\": \"女装[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"男装\",\n" +
                "                \"name\": \"男装[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"内衣家居服\",\n" +
                "                \"name\": \"内衣家居[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"童装童鞋亲子装\",\n" +
                "                \"name\": \"童装童鞋亲子装[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"鞋箱包\",\n" +
                "                \"name\": \"鞋箱包[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"零食坚果特产\",\n" +
                "                \"name\": \"零食坚果特产[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"调味干货\",\n" +
                "                \"name\": \"调味干货\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"冲饮酒类\",\n" +
                "                \"name\": \"茶叶/冲饮/酒类[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"蔬果肉类熟食\",\n" +
                "                \"name\": \"蔬果肉类熟食生鲜[简单]\",\n" +
                "                \"en\": \"简单\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"母婴用品/奶粉/辅食/孕妇用品\",\n" +
                "                \"name\": \"母婴用品/奶粉/辅食/孕妇用品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"儿童玩具/早教/益智/模型\",\n" +
                "                \"name\": \"儿童玩具/早教/益智/模型[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"运动户外\",\n" +
                "                \"name\": \"运动户外[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"家居饰品\",\n" +
                "                \"name\": \"家居饰品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"汽车用品饰品\",\n" +
                "                \"name\": \"汽车用品饰品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"图书非教材类\",\n" +
                "                \"name\": \"图书非教材类[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"绿植鲜花盆栽\",\n" +
                "                \"name\": \"绿植鲜花盆栽[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"服饰配件\",\n" +
                "                \"name\": \"服饰配件[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3C数码配件/手机配件\",\n" +
                "                \"name\": \"3C数码配件/手机配件[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"日用百货\",\n" +
                "                \"name\": \"日用百货[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"珠宝首饰\",\n" +
                "                \"name\": \"珠宝首饰[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"美妆洗护\",\n" +
                "                \"name\": \"美妆洗护[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"宠物食品用品\",\n" +
                "                \"name\": \"宠物食品用品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"保健食品/营养补充/膳食\",\n" +
                "                \"name\": \"保健食品/营养补充/膳食[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"办公用品/非电子设备类\",\n" +
                "                \"name\": \"办公用品/非电子设备类[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"文具文化用品\",\n" +
                "                \"name\": \"文具文化用品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"厨房电器/生活电器/小家电\",\n" +
                "                \"name\": \"厨房电器/生活电器/小家电[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"家纺布艺（非定制类）\",\n" +
                "                \"name\": \"家纺布艺（非定制类）[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"节庆用品礼品\",\n" +
                "                \"name\": \"节庆用品礼品[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"太阳镜/眼镜配件（不需度数适配）\",\n" +
                "                \"name\": \"太阳镜/眼镜配件（不需度数适配）[普通]\",\n" +
                "                \"en\": \"普通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"航旅/酒店/签证\",\n" +
                "                \"name\": \"航旅/酒店/签证[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"图书教材类/教育培训\",\n" +
                "                \"name\": \"图书教材类/教育培训[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"办公设备/打印机/考勤机/耗材/相关服务\",\n" +
                "                \"name\": \"办公设备/打印机/考勤机/耗材/相关服务[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"游戏话费虚拟\",\n" +
                "                \"name\": \"游戏话费/优惠劵/虚拟[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"网络设备相关（监控/模块/布网等）\",\n" +
                "                \"name\": \"网络设备相关（监控/模块/布网等）[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"家装建材/家具\",\n" +
                "                \"name\": \"家装建材/家具[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"垂钓装备/渔具\",\n" +
                "                \"name\": \"垂钓装备/渔具[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"装修设计/全屋定制\",\n" +
                "                \"name\": \"装修设计/全屋定制[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"文化玩乐(文玩/门票/动漫/音像）\",\n" +
                "                \"name\": \"文化玩乐(文玩/门票/动漫/音像）[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"定制服装家纺类\",\n" +
                "                \"name\": \"定制服装家纺类[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"代购海外发货\",\n" +
                "                \"name\": \"代购海外发货[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"定制日用品礼品\",\n" +
                "                \"name\": \"定制日用品礼品[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"多类目店铺店群\",\n" +
                "                \"name\": \"多类目店铺店群[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"汽车影音装潢/汽车零部件/养护/美容/维保\",\n" +
                "                \"name\": \"汽车影音装潢/汽车零部件/养护/美容/维保[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"租赁服务/生活服务\",\n" +
                "                \"name\": \"租赁服务/生活服务[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"情趣用品\",\n" +
                "                \"name\": \"情趣用品\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"情趣用品类/性保健品\",\n" +
                "                \"name\": \"情趣用品类/性保健品[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"电脑/相机/相关配件/智能设备\",\n" +
                "                \"name\": \"电脑/相机/相关配件/智能设备[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"农机/农用物资\",\n" +
                "                \"name\": \"农机/农用物资[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"五金/电动工具\",\n" +
                "                \"name\": \"五金/电动工具[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"医疗设备\",\n" +
                "                \"name\": \"医疗设备[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商务设计服务（商标/宣传册/注册/代开店等）\",\n" +
                "                \"name\": \"商务设计服务（商标/宣传册/注册/代开店等）[噩梦]\",\n" +
                "                \"en\": \"噩梦\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"仪器仪表/电气控制开关/机电设备\",\n" +
                "                \"name\": \"仪器仪表/电气控制开关/机电设备[噩梦]\",\n" +
                "                \"en\": \"噩梦\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"光学眼镜/隐形眼镜（带度数适配）\",\n" +
                "                \"name\": \"光学眼镜/隐形眼镜（带度数适配）[噩梦]\",\n" +
                "                \"en\": \"噩梦\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"网店网络服务/软件开发\",\n" +
                "                \"name\": \"网店网络服务/软件开发[噩梦]\",\n" +
                "                \"en\": \"噩梦\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它\",\n" +
                "                \"name\": \"其它[困难]\",\n" +
                "                \"en\": \"困难\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游\",\n" +
                "                \"name\": \"途游\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"serviceShift\",\n" +
                "        \"name\": \"客服服务班次\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"全天班\",\n" +
                "                \"name\": \"全天班(8:00-24:00)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"凌晨班\",\n" +
                "                \"name\": \"凌晨班(0:00-8:00)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"白班\",\n" +
                "                \"name\": \"白班(8:00-17:00)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"晚班\",\n" +
                "                \"name\": \"晚班(17:00-24:00)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"晚班+周末班\",\n" +
                "                \"name\": \"晚班+周末班\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"24小时\",\n" +
                "                \"name\": \"24小时（全天+凌晨）\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"夜间分流\",\n" +
                "                \"name\": \"夜间分流\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"美工\",\n" +
                "                \"name\": \"白班(9:00-17:00）\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"24小时挂号\",\n" +
                "                \"name\": \"24小时挂号\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它\",\n" +
                "                \"name\": \"其它\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游\",\n" +
                "                \"name\": \"途游\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"department\",\n" +
                "        \"name\": \"部门\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"客服部\",\n" +
                "                \"name\": \"客服部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"质检部\",\n" +
                "                \"name\": \"质检部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"培训部\",\n" +
                "                \"name\": \"培训部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"市场部\",\n" +
                "                \"name\": \"市场部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"财务部\",\n" +
                "                \"name\": \"财务部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"开发部\",\n" +
                "                \"name\": \"开发部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"企划部\",\n" +
                "                \"name\": \"企划部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"总经办\",\n" +
                "                \"name\": \"总经办\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"人资部\",\n" +
                "                \"name\": \"人资部\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它部门\",\n" +
                "                \"name\": \"其它部门\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游运营部\",\n" +
                "                \"name\": \"途游运营部\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"post\",\n" +
                "        \"name\": \"岗位\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"客服\",\n" +
                "                \"name\": \"客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"项目组长\",\n" +
                "                \"name\": \"项目组长\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"拼组主管\",\n" +
                "                \"name\": \"拼组主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"专席主管\",\n" +
                "                \"name\": \"专席主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客服部经理\",\n" +
                "                \"name\": \"客服部经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客服部副经理\",\n" +
                "                \"name\": \"客服部副经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"质检部主管\",\n" +
                "                \"name\": \"质检部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"质检专员\",\n" +
                "                \"name\": \"质检专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"数据专员\",\n" +
                "                \"name\": \"数据专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"培训部主管\",\n" +
                "                \"name\": \"培训部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"培训师\",\n" +
                "                \"name\": \"培训师\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"人事部经理\",\n" +
                "                \"name\": \"人事部经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"人事专员\",\n" +
                "                \"name\": \"人事专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"市场部总监\",\n" +
                "                \"name\": \"市场部总监\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"市场部经理\",\n" +
                "                \"name\": \"市场部经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"市场专员\",\n" +
                "                \"name\": \"市场专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客服部主管\",\n" +
                "                \"name\": \"客服部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客户售后服务\",\n" +
                "                \"name\": \"客户售后服务\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"续费专员\",\n" +
                "                \"name\": \"续费专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"文案策划\",\n" +
                "                \"name\": \"文案策划\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"美工\",\n" +
                "                \"name\": \"美工\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"运营\",\n" +
                "                \"name\": \"运营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"店长\",\n" +
                "                \"name\": \"店长\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"仓管\",\n" +
                "                \"name\": \"仓管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"推广\",\n" +
                "                \"name\": \"推广\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"开发部主管\",\n" +
                "                \"name\": \"开发部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"程序员\",\n" +
                "                \"name\": \"程序员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"交接专员\",\n" +
                "                \"name\": \"交接专员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"财务部主管\",\n" +
                "                \"name\": \"财务部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"人事部主管\",\n" +
                "                \"name\": \"人事部主管\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"会计\",\n" +
                "                \"name\": \"会计\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"出纳\",\n" +
                "                \"name\": \"出纳\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"采购员\",\n" +
                "                \"name\": \"采购员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"保洁员\",\n" +
                "                \"name\": \"保洁员\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"分公司负责人\",\n" +
                "                \"name\": \"分公司负责人\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"副总经理\",\n" +
                "                \"name\": \"副总经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"总经理\",\n" +
                "                \"name\": \"总经理\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"副董事长\",\n" +
                "                \"name\": \"副董事长\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"董事长\",\n" +
                "                \"name\": \"董事长\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它\",\n" +
                "                \"name\": \"其它\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"酒店运营\",\n" +
                "                \"name\": \"酒店运营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"销售运营助理\",\n" +
                "                \"name\": \"销售运营助理\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"stopReason\",\n" +
                "        \"name\": \"终止合作原因\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"店铺咨询量下降\",\n" +
                "                \"name\": \"店铺咨询量下降\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"自己招聘客服\",\n" +
                "                \"name\": \"自己招聘客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"店主主观感觉服务不满意\",\n" +
                "                \"name\": \"店主主观感觉服务不满意\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"店铺服务数据不达标\",\n" +
                "                \"name\": \"店铺服务数据不达标\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客服回复出现较大失误\",\n" +
                "                \"name\": \"客服回复出现较大失误\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"咨询量超出不补费用\",\n" +
                "                \"name\": \"咨询量超出不补费用\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家要求过多、太苛刻\",\n" +
                "                \"name\": \"商家要求过多、太苛刻\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家配合度较差\",\n" +
                "                \"name\": \"商家配合度较差\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家欠销售额提成不给\",\n" +
                "                \"name\": \"商家欠销售额提成不给\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"产品太难，不适合外包\",\n" +
                "                \"name\": \"产品太难，不适合外包\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家经营不善，店铺关闭\",\n" +
                "                \"name\": \"商家经营不善，店铺关闭\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家店铺被处罚，店铺暂停运营\",\n" +
                "                \"name\": \"商家店铺被处罚，店铺暂停运营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"极品商家(恶意给差评、喜欢骂人等)\",\n" +
                "                \"name\": \"极品商家(恶意给差评、喜欢骂人等)\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"暂停服务\",\n" +
                "                \"name\": \"暂停服务\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"到期一直未续费\",\n" +
                "                \"name\": \"到期一直未续费\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"调整客服导致流失\",\n" +
                "                \"name\": \"调整客服导致流失\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它原因\",\n" +
                "                \"name\": \"其它原因\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"errorType\",\n" +
                "        \"name\": \"错误类型\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"触犯质检大纲-一类错误\",\n" +
                "                \"name\": \"触犯质检大纲-一类错误\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"触犯质检大纲-二类错误\",\n" +
                "                \"name\": \"触犯质检大纲-二类错误\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"触犯质检大纲-三类错误\",\n" +
                "                \"name\": \"触犯质检大纲-三类错误\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"触犯客服部处罚规定\",\n" +
                "                \"name\": \"触犯客服部处罚规定\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"触犯公司员工手册\",\n" +
                "                \"name\": \"触犯公司员工手册\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"authType\",\n" +
                "        \"name\": \"认证状态\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"待认证\",\n" +
                "                \"name\": \"待认证\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"已认证\",\n" +
                "                \"name\": \"已认证\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"已解绑\",\n" +
                "                \"name\": \"已解绑\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"商家认证\",\n" +
                "                \"name\": \"商家认证\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"无需认证\",\n" +
                "                \"name\": \"无需认证\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"customPostType\",\n" +
                "        \"name\": \"客服岗位\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"preGroup\",\n" +
                "                \"name\": \"售前拼组客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"afterGroup\",\n" +
                "                \"name\": \"售后拼组客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"lingchenGroup\",\n" +
                "                \"name\": \"凌晨拼组客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"vipGroup\",\n" +
                "                \"name\": \"VIP专席客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"branchGroup\",\n" +
                "                \"name\": \"滁州分公司客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"name\": \"其它分公司客服\",\n" +
                "                \"val\": \"OtherbranchGroup\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"managerGroup\",\n" +
                "                \"name\": \"客服部管理层\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"putongGroup\",\n" +
                "                \"name\": \"普通加盟商客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"jinmiGroup\",\n" +
                "                \"name\": \"紧密加盟商客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"noneGroup\",\n" +
                "                \"name\": \"深度加盟商客服\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"jiudiaoGroup\",\n" +
                "                \"name\": \"酒店运营或业务\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"articleType\",\n" +
                "        \"name\": \"文库目录\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"文化用品类目精通\",\n" +
                "                \"name\": \"文化用品类类目精通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"鞋靴类目精通\",\n" +
                "                \"name\": \"鞋靴类目精通\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"公司规章制度\",\n" +
                "                \"name\": \"公司规章制度\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"质检部文档\",\n" +
                "                \"name\": \"质检部文档\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"客服部文档\",\n" +
                "                \"name\": \"客服部文档\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"企划部文档\",\n" +
                "                \"name\": \"企划部文档\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"errCode\",\n" +
                "        \"name\": \"质检错误编码\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"2-1-1\",\n" +
                "                \"name\": \"2-1-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-1-2\",\n" +
                "                \"name\": \"2-1-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-1-3\",\n" +
                "                \"name\": \"2-1-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-2-1\",\n" +
                "                \"name\": \"2-2-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-3-1\",\n" +
                "                \"name\": \"2-3-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-3-2\",\n" +
                "                \"name\": \"2-3-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-3-3\",\n" +
                "                \"name\": \"2-3-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-3-4\",\n" +
                "                \"name\": \"2-3-4\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-3-5\",\n" +
                "                \"name\": \"2-3-5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-1\",\n" +
                "                \"name\": \"2-4-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-2\",\n" +
                "                \"name\": \"2-4-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-3\",\n" +
                "                \"name\": \"2-4-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-4\",\n" +
                "                \"name\": \"2-4-4\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-5\",\n" +
                "                \"name\": \"2-4-5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-4-6\",\n" +
                "                \"name\": \"2-4-6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-1\",\n" +
                "                \"name\": \"2-5-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-2\",\n" +
                "                \"name\": \"2-5-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-3\",\n" +
                "                \"name\": \"2-5-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-4\",\n" +
                "                \"name\": \"2-5-4\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-5\",\n" +
                "                \"name\": \"2-5-5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-6\",\n" +
                "                \"name\": \"2-5-6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-7\",\n" +
                "                \"name\": \"2-5-7\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-5-8\",\n" +
                "                \"name\": \"2-5-8\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-1\",\n" +
                "                \"name\": \"2-6-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-2\",\n" +
                "                \"name\": \"2-6-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-3\",\n" +
                "                \"name\": \"2-6-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-4\",\n" +
                "                \"name\": \"2-6-4\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-5\",\n" +
                "                \"name\": \"2-6-5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2-6-6\",\n" +
                "                \"name\": \"2-6-6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-1\",\n" +
                "                \"name\": \"3-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-2\",\n" +
                "                \"name\": \"3-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-3\",\n" +
                "                \"name\": \"3-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-4\",\n" +
                "                \"name\": \"3-4\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-5\",\n" +
                "                \"name\": \"3-5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-6\",\n" +
                "                \"name\": \"3-6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-7\",\n" +
                "                \"name\": \"3-7\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-8\",\n" +
                "                \"name\": \"3-8\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3-9\",\n" +
                "                \"name\": \"3-9\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-1-1\",\n" +
                "                \"name\": \"1-1-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-2-1\",\n" +
                "                \"name\": \"1-2-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-3-1\",\n" +
                "                \"name\": \"1-3-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-4-1\",\n" +
                "                \"name\": \"1-4-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-4-2\",\n" +
                "                \"name\": \"1-4-2\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-4-3\",\n" +
                "                \"name\": \"1-4-3\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"1-4-4\",\n" +
                "                \"name\": \"1-4-4\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"shoptypeRatio\",\n" +
                "        \"name\": \"客户评价-店铺类别\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"简单\",\n" +
                "                \"name\": \"简单\",\n" +
                "                \"en\": \"24\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"普通\",\n" +
                "                \"name\": \"普通\",\n" +
                "                \"en\": \"18\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"困难\",\n" +
                "                \"name\": \"困难\",\n" +
                "                \"en\": \"12\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"噩梦\",\n" +
                "                \"name\": \"噩梦\",\n" +
                "                \"en\": \"6\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"daysRatio\",\n" +
                "        \"name\": \"客户评价-合作时长\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"30\",\n" +
                "                \"name\": \"大于30天\",\n" +
                "                \"en\": \"6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"60\",\n" +
                "                \"name\": \"大于60天\",\n" +
                "                \"en\": \"12\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"90\",\n" +
                "                \"name\": \"大于90天\",\n" +
                "                \"en\": \"18\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"180\",\n" +
                "                \"name\": \"大于180天\",\n" +
                "                \"en\": \"24\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"fitRatio\",\n" +
                "        \"name\": \"客户评价-配合度\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"D\",\n" +
                "                \"name\": \"沟通顺畅，续约及时\",\n" +
                "                \"en\": \"12\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"C\",\n" +
                "                \"name\": \"沟通顺畅，续约不及时\",\n" +
                "                \"en\": \"9\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"B\",\n" +
                "                \"name\": \"沟通不顺畅，续约及时\",\n" +
                "                \"en\": \"6\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"A\",\n" +
                "                \"name\": \"沟通不顺畅，续约不及时\",\n" +
                "                \"en\": \"3\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"benefitRatio\",\n" +
                "        \"name\": \"客户评价-效益值占比\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"0\",\n" +
                "                \"name\": \"低于均值\",\n" +
                "                \"en\": \"5\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"100\",\n" +
                "                \"name\": \"高于均值\",\n" +
                "                \"en\": \"10\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"130\",\n" +
                "                \"name\": \"超出30%以上\",\n" +
                "                \"en\": \"20\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"160\",\n" +
                "                \"name\": \"超出60%以上\",\n" +
                "                \"en\": \"40\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"levelRatio\",\n" +
                "        \"name\": \"客户评价-评级标准\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"A\",\n" +
                "                \"name\": \"A级-大于等于80分\",\n" +
                "                \"en\": \"80\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"B\",\n" +
                "                \"name\": \"B级-大于等于60分\",\n" +
                "                \"en\": \"60\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"C\",\n" +
                "                \"name\": \"C级-大于等于40分\",\n" +
                "                \"en\": \"40\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"D\",\n" +
                "                \"name\": \"D级-低于40分\",\n" +
                "                \"en\": \"0\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"dayRnumRatio\",\n" +
                "        \"name\": \"客户评价-日均接待量收费\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"1000\",\n" +
                "                \"name\": \"0-55\",\n" +
                "                \"en\": \"-1\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"2000\",\n" +
                "                \"name\": \"56-150\",\n" +
                "                \"en\": \"55\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"3000\",\n" +
                "                \"name\": \"151-250\",\n" +
                "                \"en\": \"150\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"4000\",\n" +
                "                \"name\": \"251-350\",\n" +
                "                \"en\": \"250\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"5000\",\n" +
                "                \"name\": \"351-450\",\n" +
                "                \"en\": \"350\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"6000\",\n" +
                "                \"name\": \"451-550\",\n" +
                "                \"en\": \"450\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"7000\",\n" +
                "                \"name\": \"551-650\",\n" +
                "                \"en\": \"550\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"8000\",\n" +
                "                \"name\": \"651-750\",\n" +
                "                \"en\": \"650\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"9000\",\n" +
                "                \"name\": \"751-850\",\n" +
                "                \"en\": \"750\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"10000\",\n" +
                "                \"name\": \"851-950\",\n" +
                "                \"en\": \"850\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"11000\",\n" +
                "                \"name\": \"951-1050\",\n" +
                "                \"en\": \"950\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"videoType\",\n" +
                "        \"name\": \"视频分类\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"日用百货\",\n" +
                "                \"name\": \"日用百货\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"服饰进阶\",\n" +
                "                \"name\": \"服饰\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"高级培训\",\n" +
                "                \"name\": \"高级培训\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"marketType\",\n" +
                "        \"name\": \"营销类型\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"被动营销\",\n" +
                "                \"name\": \"被动营销\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"主动营销\",\n" +
                "                \"name\": \"主动营销\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游\",\n" +
                "                \"name\": \"首次拓客\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游\",\n" +
                "                \"name\": \"二次分配\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"expandType\",\n" +
                "        \"name\": \"拓客渠道\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"阿里服务市场\",\n" +
                "                \"name\": \"阿里服务市场\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"老客户介绍\",\n" +
                "                \"name\": \"老客户介绍\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"老客户加店\",\n" +
                "                \"name\": \"老客户加店\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"老客户加组\",\n" +
                "                \"name\": \"老客户加组\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"抖音投流\",\n" +
                "                \"name\": \"抖音投流等付费渠道\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"拼多多服务市场\",\n" +
                "                \"name\": \"拼多多服务市场\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"公司官网\",\n" +
                "                \"name\": \"公司官网\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"京东服务市场\",\n" +
                "                \"name\": \"京东服务市场\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"主动打电话\",\n" +
                "                \"name\": \"主动打电话\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"线上主动拓客\",\n" +
                "                \"name\": \"线上主动拓客\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"线下主动拓客\",\n" +
                "                \"name\": \"线下主动拓客\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"抖音服务市场\",\n" +
                "                \"name\": \"抖音服务市场\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"其它\",\n" +
                "                \"name\": \"其它\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游\",\n" +
                "                \"name\": \"途游\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"exName\",\n" +
                "        \"name\": \"分部客服\",\n" +
                "        \"keys\": [\n" +
                "            {\n" +
                "                \"val\": \"本部客服\",\n" +
                "                \"name\": \"本部客服\",\n" +
                "                \"en\": \"直属\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"迈巢分部\",\n" +
                "                \"name\": \"迈巢分部\",\n" +
                "                \"en\": \"联营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"城东分部\",\n" +
                "                \"name\": \"城东分部\",\n" +
                "                \"en\": \"联营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"城南分部\",\n" +
                "                \"name\": \"城南分部\",\n" +
                "                \"en\": \"联营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"城西分部\",\n" +
                "                \"name\": \"城西分部\",\n" +
                "                \"en\": \"联营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"蚌埠分部\",\n" +
                "                \"name\": \"蚌埠分部\",\n" +
                "                \"en\": \"直属\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"加盟商客服\",\n" +
                "                \"name\": \"加盟商客服\",\n" +
                "                \"en\": \"联营\"\n" +
                "            },\n" +
                "            {\n" +
                "                \"val\": \"途游分部\",\n" +
                "                \"name\": \"途游分部\",\n" +
                "                \"en\": \"直属\"\n" +
                "            }\n" +
                "        ]\n" +
                "    },\n" +
                "    {\n" +
                "        \"id\": \"009\",\n" +
                "        \"name\": \"小蜜蜂\"\n" +
                "    }\n" +
                "]";
        Gson gson = new Gson();
        List<Item> list = gson.fromJson(str, new TypeToken<List<Item>>() {
        }.getType());
        for (Item item : list) {
            YkfDictEntity dict = new YkfDictEntity();
            dict.setDictNo(item.getId());
            dict.setDictName(item.getName());
            dictService.save(dict);
            if (ObjectUtil.isNotEmpty(item.getKeys())) {
                for (int i = 0; i < item.getKeys().size(); i++) {
                    ItemDetail key = item.getKeys().get(i);
                    YkfDictDetailEntity detail = new YkfDictDetailEntity();
                    detail.setVal(key.getVal());
                    detail.setName(key.getName());
                    detail.setDictId(dict.getDictId());
                    detail.setSort(i + 1);
                    dictDetailService.save(detail);
                }
            }
        }
        return R.ok();
    }

    @Data
    public static class Item {
        private String id;
        private String name;
        private List<ItemDetail> keys;
    }

    @Data
    public static class ItemDetail {
        private String val;
        private String name;
    }

}
